<?php
/**
 * Created by PhpStorm.
 * User: o0无忧亦无佈(285753421@qq.com)
 * Date: 15-2-6
 * Time: 下午5:53
 */

class file_uploads extends MY_Model
{
    protected $_table_name = 'document';
    protected $user_id;
    function __construct(){

        parent::__construct();
       // $user = $this->user_model->get($this->_login_user['user_id']);

    }

    function save($data){
        $data['upload_time'] = date('Y-m-d H:i:s');
        if ($this->db->insert($this->_table_name, $data)) {
            $file_id = $this->db->insert_id();
            return array('file_id' => $file_id);
        }
        return NULL;
    }
}